package com.example.cityiot;

import android.app.Application;
import android.content.SharedPreferences;

import com.example.cityiot.utils.Request;

/**
 * @ProjectName: CityIOT
 * @Package: com.example.cityiot
 * @ClassName: MyApp
 * @Description: java类作用描述
 * @Author: 罗文涛
 * @CreateDate: 12/29/21 1:40 PM
 */
public class MyApp extends Application {

    private Request request;
    private SharedPreferences mSharedPreferences;
    private SharedPreferences.Editor mEditor;

    @Override
    public void onCreate() {
        super.onCreate();
        request = new Request(getBaseContext());
        mSharedPreferences = getSharedPreferences("data",MODE_PRIVATE);
        mEditor=mSharedPreferences.edit();
    }

    public Request getRequest(){
        return request;
    }

    public void setRequest(Request request){
        this.request = request;
    }

    public SharedPreferences getSharedPreferences(){
        return mSharedPreferences;
    }

    public SharedPreferences.Editor getEditor(){
        return mEditor;
    }
}
